package com.xmotor.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xmotor.dao.ScoreTaskRuleDao;
import com.xmotor.model.DO.ScoreTaskRuleDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author Dang Xianyue
 * @Date 2020-09-12 20:35
 * @Version 1.0
 */
@Service
public class ScoreTaskRuleService {

    @Autowired
    private ScoreTaskRuleDao scoreTaskRuleDao;

    public PageInfo<ScoreTaskRuleDO> list(ScoreTaskRuleDO scoreTaskRuleDO, Integer pageNum,Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);
        List<ScoreTaskRuleDO> result = scoreTaskRuleDao.selectByScoreTaskRuleDO(scoreTaskRuleDO);
        PageInfo<ScoreTaskRuleDO> pageInfo = new PageInfo<>(result);
        return pageInfo;
    }
}
